public class Example4_5 {
    public static void main(String[] args) {
        Rect rectangle = new Rect();
        rectangle.width = 109.87;
        rectangle.height = 25.18;
        double area = rectangle.getArea();
        System.out.println("矩形的面积:"+area);
        Ladder ladder = new Ladder();
        ladder.above = 10.798;
        ladder.bottom = 156.65;
        ladder.height = 18.12;
        area = ladder.getArea();
        System.out.println("梯形的面积："+area);
    }
}
